package com.lantosec.hmrp.modules.archives.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.archives.vo.UserTrainVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 培训信息表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserTrain extends BaseEntity<UserTrainVO> {

    private static final long serialVersionUID = 1L;
    public UserTrain(UserTrainVO vo){
        this.userTrainId = vo.getUserTrainId();
        this.userId = vo.getUserId();
        this.name = vo.getName();
        this.startDate = vo.getStartDate();
        this.endDate = vo.getEndDate();
        this.period = vo.getPeriod();
        this.form = vo.getForm();
        this.content = vo.getContent();
        this.grade = vo.getGrade();
        this.cost = vo.getCost();
        this.remark = vo.getRemark();
        this.createId = vo.getCreateId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
        this.verifyId = vo.getVerifyId();
        this.verifyUser = vo.getVerifyUser();
        this.verifyTime = vo.getVerifyTime();
        this.verifyStatus = vo.getVerifyStatus();
    }

    @Override
    public UserTrainVO convertToVO(){
        return new UserTrainVO(this);
    }


    /**
     * 主键ID
     */
    @TableId(value = "user_train_id", type = IdType.ASSIGN_UUID)
    private String userTrainId;

    /**
     * user主表ID
     */
    private String userId;

    /**
     * 培训名称
     */
    private String name;

    /**
     * 开始时间
     */
    private String startDate;

    /**
     * 结束时间
     */
    private String endDate;

    /**
     * 学时
     */
    private String period;

    /**
     * 培训方式
     */
    private String form;

    /**
     * 培训内容
     */
    private String content;

    /**
     * 培训成绩
     */
    private BigDecimal grade;

    /**
     * 培训费用
     */
    private BigDecimal cost;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人ID
     */
    private String createId;

    /**
     * 创建人姓名
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 审核人ID
     */
    private String verifyId;

    /**
     * 审核人姓名
     */
    private String verifyUser;

    /**
     * 审核时间
     */
    private Date verifyTime;

    /**
     * 审核状态（0：未审核，1：以审核）
     */
    private Integer verifyStatus;


    public enum ColName {
        user_train_id, user_id, name, start_date, end_date, period, form, content, grade, cost, remark, create_id, create_user, create_time, verify_id, verify_user, verify_time, verify_status, 
    }
}
